home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / examples.arc / EXAMPL24.PRO < prev    next >
Text File  |  1986-10-07  |  361b  |  18 lines

  1. /* Program 24 */
  2.  
  3. domains
  4.     list = integer*
  5.  
  6. predicates
  7.     readlist(list)
  8.  
  9. goal
  10.     write("Enter a list of integers--\nfor example:\n1<ENTER>\n2<ENTER>\n3<ENTER><ENTER>\nwill return [1,2,3]\n"),
  11.     readlist(L),
  12.     write("\nThe Turbo Prolog list is ",L).
  13.  
  14. clauses
  15.     readlist([H|T]) :- readint(H),!,
  16.         readlist(T).
  17.     readlist([]).
  18.